<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <button-center></button-center>
</div>
<script type="text/javascript" src="js/vue.min.js"></script>
<script type="text/javascript">
    Vue.component('button-center', {
        data: function () {
            return {
                count: 0
            }
        },
        template: '<button @click="handle">点击了{{count}}次</button>',
        methods: {
            handle: function () {
                this.count += 2;
            }
        }
    })
    var vm = new Vue({
        el: "#app",
        data: {}
    })
</script>
</body>
</html>